package site.yunnong.atvris.portal.spider.v191;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.spider.HtmlBean;
import lombok.Data;
import site.yunnong.atvris.portal.spider.AbstractVideoObject;

/**
 * @author zjh
 * @date 2021/8/28 16:28
 */
@Data
@Gecco(matchUrl = "https://v.191.cn/index/play/?id={id}", pipelines = "v191VideoPipeline")
public class V191Video extends AbstractVideoObject implements HtmlBean {
    
    private static final long serialVersionUID = 1L;
    
    @RequestParameter
    private Long id;
    
    @RequestParameter
    private String imageUrl;
    
    @Text
    @HtmlField(cssPath = "body > div.layui-container.mt20 > div > div.layui-col-md8 > div:nth-child(1) > div > div.hd.f18")
    private String title;
    
//    @Attr("src")
//    @HtmlField(cssPath = "video")
    private String videoUrl;
    
//    @JSVar(var = "player.source")
//    private String player;

    @Text
    @HtmlField(cssPath = "body > div.layui-container.mt20 > div > div.layui-col-md8 > div:nth-child(2) > div > div > div.intro-main.ellipsis-2")
    private String remark;
    
//    @Text
//    @HtmlField(cssPath = ".duration")
//    private String videoTimeLength;

    @HtmlField(cssPath = "script")
    @JsonIgnore
    private String script;
    
    // 数据来源url
    private String fromUrl;

}
